package com.study;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.LockSupport;

/**
 * @author Mayjean
 * @Date2020/10/8
 */
public class MsgHandler implements Runnable {


    public void run() {
        while (true) {
            BaseManager manager = ManagerFactory.getManager(ManagerFactory.MY_MANAGER);
            manager.logic();
            LockSupport.parkNanos(TimeUnit.SECONDS.toNanos(2));
        }
    }
}